Fully Qualified Name: | Laminas\I18n\View\Helper\DateFormat |
Extends: | AbstractHelper |
View helper for formatting dates.
Name | Description | Defined By |
---|---|---|
__construct() | DateFormat | |
__invoke() | Format a date | DateFormat |
getLocale() | Get the locale to use | DateFormat |
getTimezone() | Get the timezone to use | DateFormat |
getView() | Get the view object | AbstractHelper |
setLocale() | Set locale to use instead of the default | DateFormat |
setTimezone() | Set timezone to use instead of the default | DateFormat |
setView() | Set the View object | AbstractHelper |
Returns:
Format a date
Parameter Name | Type | Description |
---|---|---|
$date | \DateTimeInterface|\IntlCalendar|int|array | |
$dateType | int | |
$timeType | int | |
$locale | string|null | |
$pattern | string|null |
Returns: string
Get the locale to use
Returns: string
Get the timezone to use
Returns: string
Get the view object
Returns: null|\Renderer
Set locale to use instead of the default
Parameter Name | Type | Description |
---|---|---|
$locale | string |
Returns: $this
Set timezone to use instead of the default
Parameter Name | Type | Description |
---|---|---|
$timezone | string |
Returns: $this
Set the View object
Parameter Name | Type | Description |
---|---|---|
$view | \Renderer |
Returns: \AbstractHelper